<?php
/**
 * @param Post[] $models
 */
$this->breadcrumbs = array(
    'Blog'
);
?>
<div class="left">
    <div class="title">Blog </div>

    <div class="row-fluid blog-edit">
	<ul>
	    <?php foreach ($models as $model) : ?>
    	    <li>
    		<div class="row-fluid">
    		    <div class="title-post-blog">
    			<a href="<?php echo $model->getUrl() ?>"><?php echo h($model->post_title, 55) ?></a>
    			<br/>
    			<span class="time-post"><?php echo date('d-m-Y', $model->updated) ?></span>
    		    </div>

    		    <div class="span8 img-content-post">
    			<div class="short-content-post-blog">
				<?php echo h($model->post_description, 400); ?>
    			</div>
    			<div class="span2 wrap-img-post-blog">
				<?php if (($image = $model->getFeaturedImageUrl(TRUE)) != '') : ?>
				    <a href="<?php echo $model->getUrl() ?>">
					<img src="<?php echo $image ?>" alt="<?php echo h($model->post_title) ?>" />
				    </a>
				<?php endif; ?>
    			</div>                    
    		    </div>
    		    <a class="btn btn-info btn-small" href="<?php echo $model->getUrl() ?>">View more</a>
    		</div>

    	    </li>
	    <?php endforeach; ?>

	</ul>

	<div class="pagination">
	    <?php
	    $this->widget('CLinkPager', array(
		'pages' => $pages,
		'cssFile' => false
	    ))
	    ?>
	</div>
    </div>
</div>
<div class="right">
    <div  id="calendar" class="box-calen"><a class="btn btn-small" id="add-event" title="Add event" href="#myModal"><i class="icon-plus"></i></a></div>
	    <?php $this->widget('application.widgets.EventCalendar') ?>
</div>